import { inject, injectable } from 'inversify';
import { APIClient, HttpMethod } from '@todo/core';
import { EDashboardEndpoints } from '../config/endpoints.ts';
import { DashboardResponseDTO } from './dashboard.dto.ts';

@injectable()
export class DashboardRepository {
  constructor(
    @inject(APIClient)
    private apiClient: APIClient,
  ) {}

  getInfo() {
    return this.apiClient.request<null, DashboardResponseDTO[]>({
      route: EDashboardEndpoints.INFO,
      method: HttpMethod.GET,
    });
  }
}
